﻿// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Globalization;

namespace ActorRuntimeManager
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            // Make sure that we know where the fabric code is located.
            // BUG: What if the fabric hasn't been installed?
            string fabricCodePath = Environment.GetEnvironmentVariable("FabricCodePath");
            if (fabricCodePath == null) fabricCodePath = @"C:\Program Files\Windows Fabric\bin\Fabric\Fabric.Code.1.0";
            string path = string.Format(CultureInfo.InvariantCulture, "{0};{1}", Environment.GetEnvironmentVariable("Path"), fabricCodePath);
            Environment.SetEnvironmentVariable("Path", path, EnvironmentVariableTarget.Process);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }

    }
}
